package com.sky.mapper;

import com.sky.annotation.AotuFillInsert;
import com.sky.annotation.AotuFillUpdate;
import com.sky.dto.SetmealPageQueryDTO;
import com.sky.entity.Setmeal;
import com.sky.enumeration.OperationType;
import com.sky.vo.SetmealVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealMapper {

    @Select("select count(id) from setmeal where category_id=#{id}")
    Integer countByCategoryId(Long id);

    Integer selectCountByDishIds(List<String> ids);

    @AotuFillInsert
    void insert(Setmeal setmeal);

    List<SetmealVO> page(SetmealPageQueryDTO setmealPageQueryDTO);

    void DeleteSetMeal(List<Long> ids);
    @Select("select * from sky_take_out.setmeal where id=#{id}")
    SetmealVO getById(Long id);
     @AotuFillUpdate
    void update(Setmeal setmeal);
}
